<template>
  <div class="classifycartoon">
    <div class="box">
      <div class="imgBox">
        <img :src="'https://images.weserv.nl/?url=' + img" v-if="img"/>
      </div>
      <h3 class="title" v-if="img">{{ title }}</h3>
      <p class="chapter" v-if="img">{{ text }}</p>
    </div>
  </div>
</template>

<script>
export default {
  name: "ClassifyCartoon",
  props: ["img", "title", "text"],
};
</script>

<style lang="less" scoped>
.box {
  width: 104px;
  height: 185px;
  // background-color: red;
  // margin-left: 16px;
  // margin-top: 5px;
  margin-top: 10px;
  .imgBox {
    width: 100%;
    height: 138px;
    // background-color: blue;
    img {
      width: 100%;
    }
  }
  .title {
    margin-top: 10px;
    font-size: 14px;
    color: #222222;
    font-weight: normal;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }
  .chapter {
    margin-top: 2px;
    font-size: 12px;
    color: #999999;
  }
}
</style>